//
//  MHAuditInfoViewModel.m
//  MiaoCircle
//
//  Created by 许正荣 on 2018/6/4.
//  Copyright © 2018年 acgera. All rights reserved.
//

#import "MHAuditInfoViewModel.h"

@implementation MHAuditInfoViewModel

-(void)initialize
{
    [super initialize];
    self.title = @"编辑资料";
    @weakify(self);
        self.auditCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal *(NSNumber  *identity ) {
            @strongify(self);

            int type = [identity intValue];
            return [[self.services.client auditMemberJoin:self.circleMember.autoId auditType: type] doNext:^(id x) {
                self.circleMember.status = type; 
                [self.services popViewModelAnimated:YES];
            }];
        }];

    
}

- (instancetype)initWithServices:(id<MHViewModelServices>)services params:(NSDictionary *)params{
    if (self = [super initWithServices:services params:params]) {
        self.circleMember = params[MHViewModelUtilKey];
    }
    return self;
}

@end
